<template>
  <el-container>
    <el-aside width="200px">
      <div :style="{'background': themeColor}" class="theme">信息化基础平台</div>
      <aside-menu style="height: 690px"></aside-menu>
    </el-aside>
    <el-container>
      <el-header :style="{'background': themeColor}">
        <el-row>
          <el-col :span="21"><color-picker @onThemeChange="onThemeChange"></color-picker></el-col>
          <el-col :span="3"><header-info></header-info></el-col>
        </el-row>
      </el-header>
      <tabs></tabs>

      <el-main style="padding-top: 5px">
<!--        <el-card>-->
          <router-view></router-view>
<!--        </el-card>-->
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
  import {mapState} from 'vuex'
  import asideMenu from './menuBar/asideMenu'
  import headerInfo from './headBar/header'
  import colorPicker from '../components/colorPicker'
  import tabs from './tabsBar/tabs2'
  export default {
    name: "index",
    components: {
      asideMenu,
      headerInfo,
      colorPicker,
      tabs
    },
    computed: {
      ...mapState({
        themeColor: state => state.theme.themeColor
      })
    },
    methods: {
      onThemeChange(color, oldColor) {
        this.$store.dispatch('onThemeChange', {color, oldColor})
      }
    }
  }
</script>

<style scoped>
  .theme {
    height: 60px;
    text-align: center;
    line-height: 60px;
    font-size: 22px;
    color: #fff;
    border-right: 1px solid #c0c4cc;
  }
  .el-header {
    /*background-color: #409EFF;*/
    color: #333;
    line-height: 60px;
    text-align: right;
    font-size: 12px
  }
</style>
